package com.execdemo.demoorderservice.feign.service.impl;

import com.execdemo.demoorderservice.domain.Eventlist;
import com.execdemo.demoorderservice.domain.Store;
import com.execdemo.demoorderservice.feign.client.EventFeignClient;
import com.execdemo.demoorderservice.feign.client.MasterFeignClient;
import com.execdemo.demoorderservice.feign.service.FeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class FeignServiceImpl implements FeignService {

    @Autowired
    private MasterFeignClient masterFeignClient;

    @Autowired
    private EventFeignClient eventFeignClient;

    @Override
    public Store getStore(String code) {
        Store store = masterFeignClient.getStore(code);
        return store;
    }

    @Override
    public Eventlist getEvent(String code) {
        Eventlist eventlist = eventFeignClient.getEventlist(code);
        return eventlist;
    }
}
